#ifndef __G_SCENE_GRAPH_NODE_H__
#define __G_SCENE_GRAPH_NODE_H__

#include <vector>

#include "../../Foundation/GUtilities/GTypes.h"
#include "../../Foundation/GUtilities/GBitContainer.h"

namespace GEngine
{
	class GGameObject;

	typedef std::vector<GGameObject*>	GGraphPath;

	enum GVisitOrder
	{
		G_VO_ROOT_TO_NODE	= 0,
		G_VO_NODE_TO_ROOT	= 1,
		G_VO_NODE_TO_LEAF	= 2,
		G_VO_LEAF_TO_NODE	= 3,
		G_VO_SIBLINGS		= 4
	};

	class GVisitor
	{
	protected:
		GUtil::GMask	Type;
		GVisitOrder		Order;

	public:
						GVisitor(GUtil::GMask VisitorType, GVisitOrder VisitOrder = G_VO_ROOT_TO_NODE);
		virtual			~GVisitor();

		GUtil::GMask	GetType() const;
		GVisitOrder		GetOrder() const;

		virtual bool	CanVisit(GGameObject* Node) const;

		void			Traverse(GGameObject* StartNode) const;

		virtual void	ProcessNode(GGameObject* CurrentNode) = 0;
	};
};

#endif